//显示滚动的提醒
var set_remind = function(time){
	$("#remind").html(time);	
}

//显示图标
var ico_remind = function(number){


	function writeCircle() {

		var canvas = document.getElementById("myCanvas");
		var videos = document.getElementById("videos");
		var strtext = document.getElementById("remind");
	
		canvas.width  = videos.offsetWidth ;
		canvas.height = videos.offsetWidth ;
		var context = canvas.getContext("2d");
		var cirX = canvas.height / 2; 
		var cirY = canvas.width / 2;
	
		strtext.style.fontSize = canvas.height+'px';
		strtext.style.lineHeight = canvas.height+'px';
	
	
		//图标半径
		//假设div宽为20,恒等于画布直径 ,÷2等于最大的半径
		var r = canvas.width /3;
		var diycolors ="#FFFFFF";
	




		//save和restore可以保证样式属性只运用于该段canvas元素
		//圆圈和时间指针
		context.save();    
		//开始     
		context.beginPath();   
		//设置边线的颜色 
		context.strokeStyle = diycolors;  
		//画一个整圆.     
		context.arc(cirX, cirY, r, 0, Math.PI * 2, false);     
		//时钟起始位置圆圈的中心
		context.moveTo(cirX, cirY);
		//宽度和高度 画 |
		context.lineTo(cirX,cirY-r);
		//##############################
		//时钟起始位置圆圈的中心
		context.moveTo(cirX, cirY);
		//宽度和高度 画 --
		context.lineTo(cirX+r,cirY);
		//##############################
		context.stroke();       //绘制边线
		context.restore();
		//#############ok##################


		//右脚
		context.save(); 
		context.beginPath();    
		context.strokeStyle =diycolors;       
		//时钟起始位置圆圈的中心
		var pi_value=Math.PI;
		//半径对角线
		var a=Math.sqrt(cirX*cirX+cirY+cirY);
		//非圆心对角线
		var b=a-r
		//起点宽是非圆心对角线+圆心对角线*2,起点高非圆心对角线+圆心对角线*2
		context.moveTo(b+r*2,b+r*2);
		//结束宽是非圆心对角线+圆心对角线*2-4分之一圆心对角线,
		//结束高非圆心对角线+圆心对角线*2-4分之一圆心对角线,
		context.lineTo(b+r*2-(r/4),b+r*2-(r/4));
		//##############################
		context.stroke();       //绘制边线
		context.restore();



		//左脚
		context.save(); 
		context.beginPath();    
		context.strokeStyle = diycolors;      
		//时钟起始位置圆圈的中心
		var pi_value=Math.PI;
		//半径对角线
		var a=Math.sqrt(cirX*cirX+cirY+cirY);
		//非圆心对角线
		var b=a-r
		//起点宽是非圆心对角线,起点高非圆心对角线+圆心对角线*2
		context.moveTo(b,b+r*2);
		//结束宽是非圆心对角线+4分之一圆心对角线,
		//结束高非圆心对角线+圆心对角线*2-4分之一圆心对角线,
		context.lineTo(b+(r/4),b+r*2-(r/4));
		//##############################
		context.stroke();       //绘制边线
		context.restore();


		//左耳朵
		context.save();  
		context.beginPath();   
		context.strokeStyle = diycolors;       
		context.arc(cirX-r, cirY-(r/2), r/3, Math.PI * 0.5, Math.PI * 1.8, false);     
		context.stroke();       
		context.restore();
		//右耳朵
		context.save();  
		context.beginPath();    
		context.strokeStyle = diycolors;     
		context.arc(cirX+r, cirY-(r/2), r/3, Math.PI * 1.2, Math.PI * 0.5, false);     
		context.stroke();       
		context.restore();


	};

	console.log("前端消息:"+number)
	if(number==1){
		writeCircle();
	};
	

	if(number==2){
		var c=document.getElementById("myCanvas");  
		c.getContext("2d");  
		c.height=c.height;  
	};



};